package pl.edu.agh.gt.data;

import java.util.Date;

/**
 * Immutable class
 */
public class Rate {
	private final float open;
	private final float low;
	private final float high;
	private final float close;
	private final Date time;

	public Rate(float o, float l, float h, float c, Date t) {
		time = t;
		open = o;
		close = c;
		low = l;
		high = h;
	}

	@Override
	public String toString() {
		return "Rate @ " + time + ": [olhc] " + open + " " + low + " " + high
				+ " " + close;
	}

	public float getOpen() {
		return open;
	}

	public float getLow() {
		return low;
	}

	public float getHigh() {
		return high;
	}

	public float getClose() {
		return close;
	}

	public Date getTime() {
		return time;
	}

}
